import { axios } from '@/utils/request'


//get
function getAction(url?: string, parameter?: any) {
    return axios({
        url: url,
        method: 'get',
        params: parameter
    })
}

//post
function postAction(url?: string, parameter?: any) {
    return axios({
        url: url,
        method: 'post',
        data: parameter
    })
}

//put
function putAction(url?: string, parameter?: any) {
    return axios({
        url: url,
        method: 'put',
        data: parameter
    })
}


//delete
function deleteAction(url?: string, parameter?: any) {
    return axios({
        url: url,
        method: 'delete',
        params: parameter
    })
}

export {
    getAction,
    postAction,
    putAction,
    deleteAction,
}